[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
LIST HOOKS
To use a procedure as a list hook it must:
1) Be a procedure declared with two passed parameters - a variable
character and a byte (indicating the highlighted topic). For example,
PROCEDURE BOBS_HOOK(VAR C:CHAR;HITOPIC:BYTE);
BEGIN
.............
END;
2) Be declared as a far procedure, i.e. precede the procedure with a
{$F+} compiler directive and succeed the procedure with the {$F-}
compiler directive.
The technique of assigning or hooking the procedure for Turbo Pascal
5.0 is different from version 4.0:
Turbo 5 Users - the LTTT variable includes a field HOOK which should
be set to the procedure name, e.g.
LTTT.HOOK := BOBS_HOOK;
Turbo 4 Users - a global variable L_UserHook (of type Pointer) should
point to the procedure with the @ directive, e.g.
L_USERHOOK := @BOBS_HOOK
The Hooked procedure will be passed the character the user just
pressed and the number of the highlighted topic. The Hooked procedure
can update the character pressed, and if the character is changed to a
null (i.e. #0) then the pressed character is ignored, i.e. the system
waits for the user to press another character. Change the character to
an End_Chars to terminate the input.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson